import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      redirect:'/good-moning',
      children: [
        {path: '/good-moning',name: 'good-moning', component: () => import('@/components/good-moning.vue')},
        {path: '/rank',name: 'rank', component: () => import('@/components/rank.vue')},
        {path: '/statistics',name: 'statistics', component: () => import('@/components/statistics.vue')},
        {path: '/my',name: 'my', component: () => import('@/components/my.vue')}
      ]
    }
  ]
})
